package be.rhok.eenzaamheidswijzer.dto;

import be.rhok.eenzaamheidswijzer.model.Answer;

public class AnswerDto {

    private long id;
    private long nextQuestionId;
    private long solutionId;
    private String value;
    private int sortNr;

    public AnswerDto() {
    }

    public AnswerDto(Answer answer) {
        this.id = answer.getId();
        this.nextQuestionId = answer.getNextQuestion() != null ? answer.getNextQuestion().getId() : -1;
        this.solutionId = answer.getSolution() != null ? answer.getSolution().getId() : -1;
        this.value = answer.getDutchValue();
        this.sortNr = answer.getSortNr();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getNextQuestionId() {
        return nextQuestionId;
    }

    public void setNextQuestionId(long nextQuestionId) {
        this.nextQuestionId = nextQuestionId;
    }

    public long getSolutionId() {
        return solutionId;
    }

    public void setSolutionId(long solutionId) {
        this.solutionId = solutionId;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getSortNr() {
        return sortNr;
    }

    public void setSortNr(int sortNr) {
        this.sortNr = sortNr;
    }
}
